package Page.NewsFeedPage;

import DataClass.Announcement;
import Navigation.NavigationController;
import DataClass.Course;
import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.transformation.FilteredList;

import java.util.ArrayList;
import java.util.List;

public class NewsFeedViewModel {
    ListProperty<Announcement> dataList1 = new SimpleListProperty<>(FXCollections.observableArrayList());
    public ListProperty<Announcement> dataListProperty1() {
        return dataList1;
    }
    public ObservableList<Announcement> getDataList1() {
        return dataList1.get();
    }
    public void setDataList1(ObservableList<Announcement> dataList) {
        this.dataList1.set(dataList);
    }
    public void setDataList1(List<Announcement> dataList) {
        setDataList1(FXCollections.observableArrayList(dataList));
    }
    public void backButtonClicked(){
        NavigationController.back();
    }
}
